import 'package:flutter/material.dart';
import 'package:xvideos/hj_model/home/home_tabs_entity.dart';
import 'package:xvideos/tools_base/widget/keep_alive_widget.dart';

import 'cartoon_sub_grid_page.dart';
import 'cartoon_sub_module_page.dart';
import 'cartoon_sub_section_page.dart';

class CartoonSubDetailPage extends StatelessWidget {
  final ModuleData? tagData;
  final CommunityType type; //-1:动漫和漫画 0:图集 1:黄游 2:小说
  const CartoonSubDetailPage({super.key, this.tagData, this.type = CommunityType.Pic});

  Widget build(BuildContext context) {
    //专题样式
    if (tagData?.showType == 3) {
      return (CartoonSubSectionPage(tagData: tagData, type: type)).keepAlive;
    } else {
      return CartoonSubGridPage(tagData: tagData, type: type).keepAlive;
    }
  }
}
